/**
 * Copyright (c) 2025 wm, All rights reserved.
 */
package com.ruoyi.game.controller;

import com.yeepay.yop.sdk.service.common.YopClient;
import com.yeepay.yop.sdk.service.common.YopClientBuilder;
import com.yeepay.yop.sdk.service.common.request.YopRequest;
import com.yeepay.yop.sdk.service.common.response.YopResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Example;




/**
 * @Description:
 * @Author: wm
 * @Created Date: 2025年11月15日
 * @LastModifyDate:
 * @LastModifyBy:
 * @Version:
 */
public class TestController {

    // 该Client线程安全，请使用单例模式，多次请求共用
    private static final YopClient client = YopClientBuilder.builder().build();
    private static final Logger LOGGER = LoggerFactory.getLogger(Example.class);

    public static void main(String[] args) {
        YopRequest request = new YopRequest("/rest/v1.0/account/withdraw/order", "POST");
        request.addParameter("parentMerchantNo", "100400612345");
        request.addParameter("requestNo", "WITHDRAW20200327103027");
        request.addParameter("merchantNo", "100400612345");
        request.addParameter("cardSelectModel", "cardSelectModel_example");
        request.addParameter("cardRouteModel", "cardRouteModel_example");
        request.addParameter("bankCardId", "11103");
        request.addParameter("bankAccountNo", "6212260200019388841");
        request.addParameter("receiveType", "receiveType_example");
        request.addParameter("orderAmount", "1");
        request.addParameter("notifyUrl", "www.baidu.com");
        request.addParameter("remark", "XXX平台提现");
        request.addParameter("terminalType", "PC");
        request.addParameter("feeDeductType", "OUTSIDE");
        request.addParameter("accountType", "accountType_example");
        request.addParameter("macAddress", "macAddress_example");
        request.addParameter("withdrawModel", "INNER_ACCOUNT_WITHDRAW");
        request.addParameter("debitBankAccountBookNo", "debitBankAccountBookNo_example");
        request.addParameter("verifyType", "PWD");
        request.addParameter("verifyValue", "verifyValue_example");

        try {
            YopResponse response = client.request(request);
            LOGGER.info("result:{}", response.getResult());
        } catch (Exception ex) {
            LOGGER.error("Exception when calling, ex:", ex);
        }
    }



}